import Foundation
import SwiftUI
import CalendarShared

public class DateStorge {
    public static let shared = DateStorge()
    public var date: Date = Date()

    public func lastMonth() {
        date = date.date(byAdding: .month, value: -1)
    }
    public func nextMonth() {
        date = date.date(byAdding: .month, value: 1)
    }
    public func lastWeek() {
        date = date.date(byAdding: .day, value: -7)
    }
    public func nextWeek() {
        date = date.date(byAdding: .day, value: 7)
    }
    public func today() {
        date = Date()
    }
}
